RAIS  3.2
C:/Projekte/RAIS/common/RADEVSearchClasses/RADEVSearchCriteria.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 
00005 namespace RAIS.Common.RADEVSearchClasses
00006 {
00007     public class RADEVSearchCriteria
00008     {
00009         protected string _filterCommand = "";
00010         protected string _filterString = "";
00011         protected string _tableName = "";
00012 
00013         public RADEVSearchCriteria(string filterCommand, string tableName)
00014         {
00015             _filterCommand = filterCommand;
00016             _tableName = tableName;
00017         }
00018 
00019         public void SetParameters(string[] parameters)
00020         {
00021             _filterString = string.Format(_filterCommand, parameters);
00022         }
00023 
00024         public string GetFilterString(bool isOR)
00025         {
00026             return isOR ? " select id from " + _filterString + " " : string.Format(" JOIN {0} [{1}] ON [{1}].ID=[{2}].ID", _filterString, _tableName, "{0}");
00027         }
00028     }
00029 }